package com.bjx.system.domain.vo;

import com.bjx.common.core.domain.group.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @desc: 组织信息VO实体
 * @author: liushuai
 * @date: 2022/09/29
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(title = "OrgVO",description = "组织信息VO实体")
public class OrgVO  {
        /**
        * 组织机构Id
        */
        @NotNull(message = "组织机构Id不能为空",groups = Update.class)
        @Schema(title = "orgId",description = "组织机构Id")
        private  String orgId;
        /**
        * 组织机构名称
        */
        @NotNull(message = "组织机构名称不能为空")
        @Size(min = 1,max = 64,message = "组织机构名称长度为1到64个字符")
        @Schema(title = "orgName",description = "组织机构名称")
        private  String orgName; 
        /**
        * 上层组织机构名称
        */
        @NotNull(message = "上层组织机构名称不能为空")
        @Schema(title = "pid",description = "上层组织机构名称")
        private  String pid;
        /**
        * 公司Id
        */
        @NotNull(message = "公司Id不能为空")
        @Schema(title = "comId",description = "公司Id")
        private  String comId;
        /**
        * 组织类型
        */
        @NotNull(message = "组织类型不能为空")
        @Schema(title = "type",description = "组织类型")
        private  Short type; 
        /**
        * 是否启用(1是/2否)
        */
        @Range(message = "是否启用(1是/2否)超出范围",min = 1,max = 2)
        @Schema(title = "enabled",description = "是否启用(1是/2否)")
        private  Short enabled; 
        /**
        * 创建时间
        */
        @Schema(title = "createDate",description = "创建时间")
        private  Date createDate; 
        /**
        * 创建用户
        */
        @Schema(title = "createUser",description = "创建用户")
        private  String createUser;
        /**
        * 修改时间
        */
        @Schema(title = "updateDate",description = "修改时间")
        private  Date updateDate; 
        /**
        * 修改用户
        */
        @Schema(title = "updateUser",description = "修改用户")
        private  String updateUser;
        /**
        * 备注
        */
        @Size(max = 255,message = "备注长度为1到255个字符")
        @Schema(title = "remark",description = "备注")
        private  String remark; 
        /**
        * 顺序字段
        */
        @Range(message = "顺序字段超出范围",min = 1,max = 2147483647)
        @Schema(title = "orderNum",description = "顺序字段")
        private  Integer orderNum;

        @Schema(title = "createUserName",description = "创建用户名称")
        private String createUserName;

        @Schema(title = "comName",description = "公司名称")
        private String comName;
}